Skip to content

test(tests): pass exclude_resource_kinds in the code pipeline citation test - #313

Open
karan-panda wants to merge 1 commit into
kubeflow:mainfrom
karan-panda:fix-code-utils-test
Open

karan-panda wants to merge 1 commit into
kubeflow:mainfrom
karan-panda:fix-code-utils-test

Conversation

@karan-panda

Copy link
Copy Markdown

Fixes #312

test_code_pipeline_preserves_github_canonical_citation_url fails since #290 added the required exclude_resource_kinds argument to chunk_and_embed_code():

TypeError: chunk_and_embed_code() missing 1 required positional argument: 'exclude_resource_kinds'

CI doesn't catch it: the test skips itself unless kfp is installed, and the test job doesn't install it. It fails locally with kfp installed.

This passes the pipeline's own default, "CustomResourceDefinition". The test's YAML is an Experiment, so nothing is excluded and the citation URL check is unchanged.

Testing: tests/test_code_utils.py 11 passed; full suite 192 passed; ruff check and ruff format --check clean. Test-only change, so no /eval or re-ingest needed.

…n test

Signed-off-by: Karan Panda <karanpanda1206@gmail.com>
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign franciscojavierarceo for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Updated a code-pipeline test to exclude custom resource definitions during processing.

The citation test now passes exclude_resource_kinds="CustomResourceDefinition" to chunk_and_embed_code. Its citation URL assertions are unchanged.

Changes: Code pipeline citation test

Layer / File(s) Summary
Update test call
tests/test_code_utils.py
The test passes exclude_resource_kinds="CustomResourceDefinition" to chunk_and_embed_code. The citation URL assertions remain unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other · Severity of issue fixed: Low

Possibly related PRs

  • kubeflow/docs-agent#290: The linked issue says this PR updates the test to provide an argument required after changes associated with PR #290.

Suggested reviewers: kmr-rohit, chasecadet

Merge Risk: Minimal · up to 8e8c5

This is a test-only fix that supplies a missing required argument so the citation test can run again when kfp is installed. It has no production impact and is safe to merge.

Security architecture risk: Minimal · up to 8e8c5

The citation test now supplies an argument the pipeline function already requires. Production behavior is unchanged.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: the code pipeline citation test now passes the required exclude_resource_kinds argument. It is short, specific, and matches the raw summary (+1/-0 in tests/test_code_…
Description check Passed The description explains the failure (a TypeError from the missing exclude_resource_kinds argument added in #290), links issue #312, names the value passed ("CustomResourceDefinition"), and lists the …
Linked Issues check Passed Issue #312 requires passing exclude_resource_kinds="CustomResourceDefinition" to the chunk_and_embed_code() call in test_code_pipeline_preserves_github_canonical_citation_url. The whole-PR diff …
Out of Scope Changes check Passed The whole-PR diff against the merge base changes one file, tests/test_code_utils.py, by one added line. The line is the keyword argument required by #312 and sits in the test that #312 names. No oth…
Full details: Title check

Explanation

The title states the main change: the code pipeline citation test now passes the required exclude_resource_kinds argument. It is short, specific, and matches the raw summary (+1/-0 in tests/test_code_utils.py) and the linked issue #312.

Full details: Description check

Explanation

The description explains the failure (a TypeError from the missing exclude_resource_kinds argument added in #290), links issue #312, names the value passed ("CustomResourceDefinition"), and lists the test results. It matches the one-line test change in the raw summary and the objectives.

Full details: Linked Issues check

Explanation

Issue #312 requires passing exclude_resource_kinds="CustomResourceDefinition" to the chunk_and_embed_code() call in test_code_pipeline_preserves_github_canonical_citation_url. The whole-PR diff against the merge base adds exactly this keyword argument at the call site in tests/test_code_utils.py (+1/-0). This meets the only coding requirement in the issue. The CI gap noted in #312 (the test skips when kfp is absent) is context, not a stated fix requirement. This PR does not change the skip behavior, and the issue does not require it. I did not re-read the pipeline source to confirm the default value; the issue and PR description state it, and the requirement is the explicit argument at the call site.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base changes one file, tests/test_code_utils.py, by one added line. The line is the keyword argument required by #312 and sits in the test that #312 names. No other files or hunks change. The raw summary and PR description match the diff. No out-of-scope changes were found.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9ac6339 and 8e8c5df.

Files selected for processing: 1

  • tests/test_code_utils.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@karan-panda

Copy link
Copy Markdown
Author

Hi @kmr-rohit, this is a one-line test fix for #312 (the test broke after #290). CI hasn't run yet, so could you add /ok-to-test when you get a chance? Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(tests): code pipeline citation test fails since exclude_resource_kinds was added

1 participant